package com.corpgovernment.organization.mapper;

import com.corpgovernment.organization.entity.db.OrganizationChangeHistory;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zl.cui
 * @date 2023/9/19
 */
@Mapper
public interface OrganizationChangeHistoryMapper {
    @Insert("<script> insert into organization_change_history  (before_org_id,current_org_id,employee_id,operate_type)  values " +
            " <foreach collection='historyList' item='item' index='index' separator=','>" +
            "(#{item.beforeOrgId},#{item.currentOrgId},#{item.employeeId},#{item.operateType})</foreach></script>")
    int batchInsert(@Param("historyList")List<OrganizationChangeHistory> historyList);
}
